package com.task.mall.service.impl;

import com.task.mall.bean.Goods;
import com.task.mall.bean.Type;
import com.task.mall.dao.TypeDao;
import com.task.mall.dao.impl.TypeDaoImpl;
import com.task.mall.service.TypeService;

import java.util.List;

public class TypeServiceImpl implements TypeService {
    private TypeDao typeDao = new TypeDaoImpl();
    @Override
    public List<Type> getType() {
        return typeDao.getType();
    }

    @Override
    public int addType(Type type) {
        return typeDao.addType(type);
    }

    @Override
    public int deleteType(int typeId) {
        return typeDao.deleteType(typeId);
    }

    @Override
    public List<Goods> getGoodsByType(String typeId) {
        return typeDao.getGoodsByType(typeId);
    }

    @Override
    public List<Goods> searchGoods(String keyword) {
        return typeDao.searchGoods(keyword);
    }
}
